extends Control


var data = null

signal edit(data)
signal delete(data)

const aRepeat_text = ["", "隐藏", "显示"]

func _ready():
	pass 

func set_data(data):
	self.data = data
	var id = data["id"]
	$hbox/id.text = str(id)
	
	$hbox/name.text = data["name"]
	$hbox/name.hint_tooltip = data["description"]
	
	$hbox/maxCatchLevel.text = str("LV.", data["maxCatchLevel"])
	$hbox/hide.text = aRepeat_text[data["hide"]]
	

func _on_edit_button_up():
	emit_signal("edit", data)


func _on_delete_button_up():
	emit_signal("delete", data)
